package com.cqc.googleplay.utils;

import com.cqc.googleplay.fragment.home.AppFrag;
import com.cqc.googleplay.fragment.home.ClassifyFrag;
import com.cqc.googleplay.fragment.home.GameFrag;
import com.cqc.googleplay.fragment.home.HomeFrag;
import com.cqc.googleplay.fragment.home.HotFrag;
import com.cqc.googleplay.fragment.home.RecommendFrag;
import com.cqc.googleplay.fragment.home.SubjectFrag;

import android.support.v4.app.Fragment;

public class FragmentFactory {
	
	public static Fragment createFragment(int position){
		Fragment fragment = null ;
		switch (position) {
		case 0:
			fragment = new  HomeFrag();
			break;
		case 1:
			fragment = new  AppFrag();
			break;
		case 2:
			fragment = new  GameFrag();
			break;
		case 3:
			fragment = new  SubjectFrag();
			break;
		case 4:
			fragment = new  RecommendFrag();
			break;
		case 5:
			fragment = new  ClassifyFrag();
			break;
		case 6:
			fragment = new  HotFrag();
			break;
		}
		return fragment;
	}
}
